Optimal. Leaf size=246 \[ \frac {(2 A-5 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{5/2} d}-\frac {(43 A-115 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(7 A-15 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}-\frac {(11 A-35 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.53, antiderivative size = 246, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4104, 4106,
4108, 3893, 212, 3886, 221} \begin {gather*} -\frac {(43 A-115 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(2 A-5 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{a^{5/2} d}-\frac {(11 A-35 B) \sin (c+d x) \sec ^{\frac {3}{2}}(c+d x)}{16 a^2 d \sqrt {a \sec (c+d x)+a}}+\frac {(A-B) \sin (c+d x) \sec ^{\frac {7}{2}}(c+d x)}{4 d (a \sec (c+d x)+a)^{5/2}}+\frac {(7 A-15 B) \sin (c+d x) \sec ^{\frac {5}{2}}(c+d x)}{16 a d (a \sec (c+d x)+a)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 221
Rule 3886
Rule 3893
Rule 4104
Rule 4106
Rule 4108
Rubi steps
\begin {align*} \int \frac {\sec ^{\frac {7}{2}}(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^{5/2}} \, dx &=\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {\int \frac {\sec ^{\frac {5}{2}}(c+d x) \left (\frac {5}{2} a (A-B)-a (A-5 B) \sec (c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx}{4 a^2}\\ &=\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(7 A-15 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}+\frac {\int \frac {\sec ^{\frac {3}{2}}(c+d x) \left (\frac {3}{4} a^2 (7 A-15 B)-\frac {1}{2} a^2 (11 A-35 B) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{8 a^4}\\ &=\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(7 A-15 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}-\frac {(11 A-35 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}}+\frac {\int \frac {\sqrt {\sec (c+d x)} \left (-\frac {1}{4} a^3 (11 A-35 B)+4 a^3 (2 A-5 B) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{8 a^5}\\ &=\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(7 A-15 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}-\frac {(11 A-35 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}}-\frac {(43 A-115 B) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx}{32 a^2}+\frac {(2 A-5 B) \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx}{2 a^3}\\ &=\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(7 A-15 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}-\frac {(11 A-35 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}}+\frac {(43 A-115 B) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{16 a^2 d}-\frac {(2 A-5 B) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^3 d}\\ &=\frac {(2 A-5 B) \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{5/2} d}-\frac {(43 A-115 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{16 \sqrt {2} a^{5/2} d}+\frac {(A-B) \sec ^{\frac {7}{2}}(c+d x) \sin (c+d x)}{4 d (a+a \sec (c+d x))^{5/2}}+\frac {(7 A-15 B) \sec ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{16 a d (a+a \sec (c+d x))^{3/2}}-\frac {(11 A-35 B) \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{16 a^2 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(941\) vs. \(2(246)=492\).
time = 6.17, size = 941, normalized size = 3.83 \begin {gather*} -\frac {A \sec ^{\frac {9}{2}}(c+d x) \sin (c+d x)}{4 d (a (1+\sec (c+d x)))^{5/2}}-\frac {B \sec ^{\frac {11}{2}}(c+d x) \sin (c+d x)}{4 d (a (1+\sec (c+d x)))^{5/2}}+\frac {3 A \sec ^{\frac {9}{2}}(c+d x) (1+\sec (c+d x)) \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}+\frac {7 B \sec ^{\frac {11}{2}}(c+d x) (1+\sec (c+d x)) \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}-\frac {11 A \sec ^{\frac {3}{2}}(c+d x) (1+\sec (c+d x))^2 \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}+\frac {35 B \sec ^{\frac {3}{2}}(c+d x) (1+\sec (c+d x))^2 \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}+\frac {7 A \sec ^{\frac {5}{2}}(c+d x) (1+\sec (c+d x))^2 \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}-\frac {15 B \sec ^{\frac {5}{2}}(c+d x) (1+\sec (c+d x))^2 \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}-\frac {3 A \sec ^{\frac {7}{2}}(c+d x) (1+\sec (c+d x))^2 \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}+\frac {11 B \sec ^{\frac {7}{2}}(c+d x) (1+\sec (c+d x))^2 \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}-\frac {7 B \sec ^{\frac {9}{2}}(c+d x) (1+\sec (c+d x))^2 \sin (c+d x)}{16 d (a (1+\sec (c+d x)))^{5/2}}-\frac {11 A \text {ArcSin}\left (\sqrt {1-\sec (c+d x)}\right ) (1+\sec (c+d x))^2 \tan (c+d x)}{16 d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{5/2}}+\frac {35 B \text {ArcSin}\left (\sqrt {1-\sec (c+d x)}\right ) (1+\sec (c+d x))^2 \tan (c+d x)}{16 d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{5/2}}-\frac {43 A \text {ArcSin}\left (\sqrt {\sec (c+d x)}\right ) (1+\sec (c+d x))^2 \tan (c+d x)}{16 d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{5/2}}+\frac {115 B \text {ArcSin}\left (\sqrt {\sec (c+d x)}\right ) (1+\sec (c+d x))^2 \tan (c+d x)}{16 d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{5/2}}+\frac {43 A \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) (1+\sec (c+d x))^2 \tan (c+d x)}{16 \sqrt {2} d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{5/2}}-\frac {115 B \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right ) (1+\sec (c+d x))^2 \tan (c+d x)}{16 \sqrt {2} d \sqrt {1-\sec (c+d x)} (a (1+\sec (c+d x)))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(830\) vs.
\(2(209)=418\).
time = 8.41, size = 831, normalized size = 3.38
method | result | size |
default | \(\frac {\left (\frac {1}{\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (-1+\cos \left (d x +c \right )\right )^{2} \left (-16 A \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+16 A \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right )+40 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}-40 B \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right )+11 A \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}-43 A \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right )-16 A \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}+16 A \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sin \left (d x +c \right ) \sqrt {2}\, \cos \left (d x +c \right )-35 B \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+115 B \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right )+40 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}-40 B \arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right ) \sin \left (d x +c \right ) \sqrt {2}\, \cos \left (d x +c \right )+4 A \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}-43 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )-20 B \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+115 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}}{2}\right ) \sin \left (d x +c \right ) \cos \left (d x +c \right )-15 A \cos \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+39 B \cos \left (d x +c \right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}+16 B \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\right )}{16 d \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )^{5} a^{3}}\) | \(831\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 14037 vs.
\(2 (209) = 418\).
time = 4.93, size = 14037, normalized size = 57.06 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.45, size = 803, normalized size = 3.26 \begin {gather*} \left [-\frac {\sqrt {2} {\left ({\left (43 \, A - 115 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (43 \, A - 115 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (43 \, A - 115 \, B\right )} \cos \left (d x + c\right ) + 43 \, A - 115 \, B\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {2} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 16 \, {\left ({\left (2 \, A - 5 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, A - 5 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (2 \, A - 5 \, B\right )} \cos \left (d x + c\right ) + 2 \, A - 5 \, B\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} + \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + \frac {4 \, {\left ({\left (11 \, A - 35 \, B\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left (3 \, A - 11 \, B\right )} \cos \left (d x + c\right ) - 16 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{64 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}, \frac {\sqrt {2} {\left ({\left (43 \, A - 115 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (43 \, A - 115 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (43 \, A - 115 \, B\right )} \cos \left (d x + c\right ) + 43 \, A - 115 \, B\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )}}{a \sin \left (d x + c\right )}\right ) + 16 \, {\left ({\left (2 \, A - 5 \, B\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, A - 5 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (2 \, A - 5 \, B\right )} \cos \left (d x + c\right ) + 2 \, A - 5 \, B\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right ) - \frac {2 \, {\left ({\left (11 \, A - 35 \, B\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left (3 \, A - 11 \, B\right )} \cos \left (d x + c\right ) - 16 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{32 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{7/2}}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________